import request from '@/utils/request'

/**
 * 获取在线用户列表
 */
export function getOnlineList(query?: any) {
  return request.get('/monitor/online/list', query)
}

/**
 * 获取在线用户统计
 */
export function getOnlineStats() {
  return request.get('/monitor/online/stats')
}

/**
 * 强制退出用户
 */
export function forceLogout(tokenId: string) {
  return request.delete(`/monitor/online/${tokenId}`, {}, {
    showLoading: true,
    showSuccess: true,
    successMsg: '强制退出成功',
  })
}

/**
 * 批量强制退出用户
 */
export function batchForceLogout(tokenIds: string) {
  return request.delete(`/monitor/online/batch/${tokenIds}`, {}, {
    showLoading: true,
    showSuccess: true,
    successMsg: '批量强制退出成功',
  })
}

